﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Corporation.Project.Migrations.ProjectDb
{
    /// <inheritdoc />
    public partial class init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "Corporation.Project_Demo",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", maxLength: 128, nullable: false, comment: "编号"),
                    IsLocked = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否锁定"),
                    OrganizationId = table.Column<long>(type: "bigint", nullable: true, comment: "组织机构编号"),
                    DepartmentId = table.Column<long>(type: "bigint", nullable: true, comment: "部门编号"),
                    CreatorId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者编号"),
                    CreatedTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "创建时间"),
                    UpdaterId = table.Column<long>(type: "bigint", nullable: true, comment: "更新者编号"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "更新时间"),
                    DeletedTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    DataVersion = table.Column<long>(type: "bigint", nullable: false, comment: "数据版本")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Corporation.Project_Demo", x => x.Id);
                },
                comment: "Demo")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Corporation.Project_Demo");
        }
    }
}
